#ifndef COFFEE_HPP
#define COFFEE_HPP

#include "Beverage.hpp"

// 咖啡尺寸
enum Size
{
  TALL,
  GRANDE,
  VENTI
};

class Coffee : public Beverage
{
protected:
  Size _size;

public:
  Coffee(std::string description)
      : Beverage(description)
  {
  }

  Coffee(std::string description, double cost)
      : Beverage(description, cost), _size(TALL)
  {
  }

  virtual void SetSize(Size) = 0;
  virtual Size GetSize() = 0;
};

class HouseBlend : public Coffee
{
protected:
public:
  HouseBlend()
      : Coffee("黑咖啡", 12)
  {
  }

  std::string GetDescription()
  {
    std::cout << "订单：";
    return _description;
  }

  double Cost()
  {
    return _cost;
  }

  Size GetSize()
  {
    return _size;
  }

  void SetSize(Size size)
  {
    _size = size;
    if (_size == TALL)
    {
      _cost = 12;
    }

    if (_size == GRANDE)
    {
      _cost = 14;
    }

    if (_size == VENTI)
    {
      _cost = 16;
    }
  }
};

class DarkRoast : public Coffee
{
protected:
public:
  DarkRoast()
      : Coffee("黑暗烘烤黑咖啡", 10)
  {
  }

  std::string GetDescription()
  {
    std::cout << "订单：";
    return _description;
  }

  double Cost()
  {
    return _cost;
  }

  Size GetSize()
  {
    return _size;
  }

  void SetSize(Size size)
  {
    _size = size;
    if (_size == TALL)
    {
      _cost = 10;
    }

    if (_size == GRANDE)
    {
      _cost = 12;
    }

    if (_size == VENTI)
    {
      _cost = 14;
    }
  }
};

class Espresson : public Coffee
{
protected:
public:
  Espresson()
      : Coffee("浓缩咖啡", 15)
  {
  }

  std::string GetDescription()
  {
    std::cout << "订单：";
    return _description;
  }

  double Cost()
  {
    return _cost;
  }

  Size GetSize()
  {
    return _size;
  }

  void SetSize(Size size)
  {
    _size = size;
    if (_size == TALL)
    {
      _cost = 15;
    }

    if (_size == GRANDE)
    {
      _cost = 17;
    }

    if (_size == VENTI)
    {
      _cost = 19;
    }
  }
};

class Decaf : public Coffee
{
protected:
public:
  Decaf()
      : Coffee("低卡咖啡", 20)
  {
  }

  std::string GetDescription()
  {
    std::cout << "订单：";
    return _description;
  }

  double Cost()
  {
    return _cost;
  }

  Size GetSize()
  {
    return _size;
  }

  void SetSize(Size size)
  {
    _size = size;
    if (_size == TALL)
    {
      _cost = 20;
    }

    if (_size == GRANDE)
    {
      _cost = 22;
    }

    if (_size == VENTI)
    {
      _cost = 24;
    }
  }
};

#endif
